package com.hanrui.android.adapter;

import android.widget.ImageView;

import com.bumptech.glide.load.resource.bitmap.CircleCrop;
import com.bumptech.glide.request.RequestOptions;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.hanrui.android.GlideApp;
import com.hanrui.android.R;
import com.hanrui.android.model.CompanyListBean;

import javax.inject.Inject;

/**
 * 通讯录（部门）
 */

public class MobileAdapter extends BaseQuickAdapter<CompanyListBean.IsAttendListBean,BaseViewHolder> {

    @Inject
    public MobileAdapter(){ super(R.layout.item_mainmessige); }

    @Override
    protected void convert(BaseViewHolder helper, CompanyListBean.IsAttendListBean item) {

        GlideApp.with(mContext)
                .load(R.mipmap.default_avatar2x)
                .apply(RequestOptions.bitmapTransform(new CircleCrop()))
                .into((ImageView) helper.getView(R.id.messige_icon));

        helper.setText(R.id.messige_title,item.getName());
    }
}